package bridage

import (
	"fmt"
)

type Draw interface {
	DrawCircle(r, x, y int)
}

type RedCircle struct {
}

func (g *RedCircle) DrawCircle(r, x, y int) {
	fmt.Println("Drawing a red circle with radius", r, "at", x, y)
}

type GreenCircle struct {
}

func (g *GreenCircle) DrawCircle(r, x, y int) {
	fmt.Println("Drawing a green circle with radius", r, "at", x, y)
}

type Shape struct {
	draw Draw
}

func (s *Shape) Shape(d Draw) {
	s.draw = d
}

type Circle struct {
	x, y, r int
	shape   Shape
}

func (c *Circle) Constructor(x, y, r int, d Draw) {
	c.x = x
	c.y = y
	c.r = r
	c.shape.Shape(d)
}

func (c *Circle) Draw() {
	c.shape.draw.DrawCircle(c.r, c.x, c.y)
}
